package es.udc.iagolast.androidJam.Util;

import com.google.android.maps.GeoPoint;

public class MyMarker {

	private int type;
	private GeoPoint gPoint;
	private String message;

	public MyMarker(String input) {

		String[] splitedInput = input.split("#");
		this.type = Integer.getInteger(splitedInput[0]);
		this.gPoint = new GeoPoint(Integer.getInteger(splitedInput[1]),
				Integer.getInteger(splitedInput[2]));
		this.message = splitedInput[3];
	}

	public MyMarker(int type, GeoPoint gPoint, String message) {
		super();
		this.type = type;
		this.gPoint = gPoint;
		this.message = message;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public GeoPoint getgPoint() {
		return gPoint;
	}

	public void setgPoint(GeoPoint gPoint) {
		this.gPoint = gPoint;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return type + "#" + gPoint.getLatitudeE6() + "#"
				+ gPoint.getLongitudeE6() + "#" + message;
	}

}
